/**
 * @param {number[]} nums
 * @return {boolean}
 * @description set函数 判断两个长度
 */

var containsDuplicate = function (nums) {
    let arr = Array.from(new Set(nums))
    return arr.length < nums.length
};
containsDuplicate([1, 2, 3, 1])